import {WINDOW_INFO_CONTENT,CAPSULE_BUTTON_INFO}from '@/utils/config.js'
import{computed,ref}from'vue'
export const statusHeight=computed(()=>WINDOW_INFO_CONTENT.statusBarHeight||25)

export const titleHeight=computed(()=>{
	// 不可以直接直接判断是否为空对象，直接判断不管如何都会是false，因为对象比较的是引用而不是内容
	// if(CAPSULE_BUTTON_INFO==={})return 40
	if(!CAPSULE_BUTTON_INFO || Object.keys(CAPSULE_BUTTON_INFO).length === 0)
	return 40
	return (CAPSULE_BUTTON_INFO.top-statusHeight.value)*2+CAPSULE_BUTTON_INFO.height
})
export const topContentHight=computed(()=>statusHeight.value+titleHeight.value)
export const useNarvcontent=computed(()=>{
	const statusNarH=computed(()=> statusHeight.value+'px')
	const capsuleTitleH=computed(()=>titleHeight.value+'px')
	const topContentH=computed(()=>topContentHight.value+'px')
	return{
		statusNarH,
		capsuleTitleH,
		topContentH
	}
	
})